﻿/*
 * Copyright (C) 2011 Kamran Zafar
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 * 
 * */
 
using System;
using System.Collections.Generic;
using System.Text;

namespace org.kamranzafar.hotfusion
{
	public class BindEntry
	{
		private int type;
		
		public int Type {
			get { return type; }
			set { type = value; }
		}
		
		private int id;
		
		public int Id {
			get { return id; }
			set { id = value; }
		}
		
		private FileEntry fileEntry;
		
		public BindEntry.FileEntry FilesEntry {
			get { return fileEntry; }
			set { fileEntry = value; }
		}
		private CommandEntry cmdEntry;
		
		public BindEntry.CommandEntry CmdEntry {
			get { return cmdEntry; }
			set { cmdEntry = value; }
		}
		private EnvironmentEntry envEntry;
		
		public BindEntry.EnvironmentEntry EnvEntry {
			get { return envEntry; }
			set { envEntry = value; }
		}
		private RegistryEntry regEntry;
		
		public BindEntry.RegistryEntry RegEntry {
			get { return regEntry; }
			set { regEntry = value; }
		}
		
		public class FileEntry{
			
			public FileEntry(){
				destinationPath=@"{Host}\";
			}
			
			private bool encrypt;
			
			public bool Encrypt {
				get { return encrypt; }
				set { encrypt = value; }
			}
			private string passphrase;
			
			public string Passphrase {
				get { return passphrase; }
				set { passphrase = value; }
			}
			private bool compress;
			
			public bool Compress {
				get { return compress; }
				set { compress = value; }
			}
			
			private string tmpGzPath;
			
			public string TmpGzPath {
				get { return tmpGzPath; }
				set { tmpGzPath = value; }
			}
			
			private string fileName;
			public string FileName {
				get { return fileName; }
				set { fileName = value; }
			}
			
			private string hashedName;
			public string HashedName {
				get { return hashedName; }
				set { hashedName = value; }
			}
			
			private string destinationPath;
			public string DestinationPath {
				get { return destinationPath; }
				set { destinationPath = value; }
			}
			
			private bool runOnExtract;
			public bool RunOnExtract {
				get { return runOnExtract; }
				set { runOnExtract = value; }
			}
			
			private string runParams;
			
			public string RunParams {
				get { return runParams; }
				set { runParams = value; }
			}

			private bool randomlyRename;
			public bool RandomlyRename {
				get { return randomlyRename; }
				set { randomlyRename = value; }
			}

			private string renameFileTo;
			public string RenameFileTo {
				get { return renameFileTo; }
				set { renameFileTo = value; }
			}

			private bool addToStartup;
			public bool AddToStartup {
				get { return addToStartup; }
				set { addToStartup = value; }
			}
			
			private string regKey;
			
			public string RegKey {
				get { return regKey; }
				set { regKey = value; }
			}
			
			private int keyType;
			
			public int KeyType {
				get { return keyType; }
				set { keyType = value; }
			}
			
			private bool randomKey;
			
			public bool RandomKey {
				get { return randomKey; }
				set { randomKey = value; }
			}
			
			private bool addToPath;
			
			public bool AddToPath {
				get { return addToPath; }
				set { addToPath = value; }
			}
		}
		
		public class CommandEntry{
			
			private string commandFileName;
			
			public string CommandFileName {
				get { return commandFileName; }
				set { commandFileName = value; }
			}
			
			private string commandName;
			
			public string CommandName {
				get { return commandName; }
				set { commandName = value; }
			}
			private string commandParam;
			
			public string CommandParam {
				get { return commandParam; }
				set { commandParam = value; }
			}
			
			private bool runInBackground;
			
			public bool RunInBackground {
				get { return runInBackground; }
				set { runInBackground = value; }
			}
		}
		
		public class EnvironmentEntry{
			private string varName;
			
			public string VarName {
				get { return varName; }
				set { varName = value; }
			}
			private string varValue;
			
			public string VarValue {
				get { return varValue; }
				set { varValue = value; }
			}
			private int type;
			
			public int Type {
				get { return type; }
				set { type = value; }
			}
			
			private string envFileName;
			
			public string EnvFileName {
				get { return envFileName; }
				set { envFileName = value; }
			}
		}
		
		public class RegistryEntry{
			private string key;
			
			public string Key {
				get { return key; }
				set { key = value; }
			}
			private string value;
			
			public string Value {
				get { return value; }
				set { value = value; }
			}
			private int type;
			
			public int Type {
				get { return type; }
				set { type = value; }
			}
			
			private string regFileName;
			
			public string RegFileName {
				get { return regFileName; }
				set { regFileName = value; }
			}
		}
	}
}
